Skip to content

Add newer node_compat common helpers and sqlite fixtures - #217

Closed
noise64 wants to merge 2 commits into
mainfrom
node-compat-common-helpers
Closed

noise64 wants to merge 2 commits into
mainfrom
node-compat-common-helpers

Conversation

@noise64

@noise64 noise64 commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor
  • relates to GOL-1947 (prerequisite for the Node 26.13.1 switch; the 22.14.0 target and config are unchanged)
  • adds the test/common helpers that newer upstream tests call: hasFIPS()/isBoringSSL in crypto.js, plus hasInspector, hasSQLite, skipIfSQLiteMissing, expectRequireStack, expectRequiredTLAError, sleepSync, isRiscv64, usesSharedLibrary, hasFFI/skipIfFFIMissing, hasPerfetto/skipIfPerfettoEnabled/Disabled, hasDtls, hasLocalStorage, hasTemporal, hasFullICU and hasV8Sandbox. index.mjs exports the subset of these that upstream 26.13.1 index.mjs exports (hasInspector, hasSQLite, hasFFI, hasDtls, hasLocalStorage, hasTemporal, hasV8Sandbox, isRiscv64, skipIfSQLiteMissing, skipIfPerfettoEnabled, sleepSync); not every new CommonJS helper is exported from ESM
  • common.skip() counts as a pass, so each capability flag reports what the component actually provides. hasSQLite probes node:sqlite instead of reading process.versions.sqlite, which the runtime does not set; a guard therefore cannot skip a test whose module exists
  • vendor.sh also vendors test/sqlite/, and setup_node_compat_test_files copies it, for require('../sqlite/next-db.js')

Node compatibility

The full 22.14.0 lane and the 247-case 26.13.1 probe below ran on b011485's tree before its last edit, which made the hasSQLite probe try Database before DatabaseSync. On the final tree, only the focused checks listed at the end ran; the broad lanes were not rerun.

  • 22.14.0 (this target): full local node_compat lane gives 3260 passed, 0 failed, 3651 ignored, matching the base report.md primary count of 3260
  • the config and report.md are unchanged

Probe against the 26.13.1 suite (scratch config from NJ-01, not part of this PR): 77 runnable files use the new helpers or test/sqlite. The probe run is red locally (exit 101; 137 failures). Of its 247 runnable suite cases, plus the 2 value probes, which pass:

  • 72 pass now and failed without the helpers. These are the same 72 that NJ-01's scratch helpers recovered
  • 1 more passes because test/sqlite is copied (test-sqlite.js test_03)
  • 37 passed before and still pass
  • 137 still fail, as they did with NJ-01's scratch helpers, mostly on runtime gaps such as node:sqlite's Node 26 Database rename
  • no case that passed with the scratch helpers fails here

Local checks on the final tree: fmt, clippy --all-targets -Dwarnings, node_compat_report (35 passed, 1 ignored), node --check on the shim files, a host Node check of the hasSQLite guard with and without --no-experimental-sqlite, and a 26.13.1 component run of the two value probes plus test-sqlite.js test_03 (3 passed).

noise64 commented Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

Folded into #218, which now targets main and contains this branch at 5b1fa1b, so the Node 26 harness, helpers and target switch are reviewed and merged as one PR. Closing in favour of #218; the branch is kept.

@noise64 noise64 closed this Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant